import java.math.BigInteger;

public class demo01 {
    public static void main(String[] args) {
        String n = "2023";
        while (true) {
            boolean flag = true;
            String num = new BigInteger(n, 10).toString(16);
            for (int i = 0; i < num.length(); i++) {
                if (num.charAt(i) >= '0' && num.charAt(i) <= '9') {
                    flag = false;
                    break;
                }
            }
            if (flag == true) {
                System.out.println(n);
                break;
            }
            int n1 = Integer.parseInt(n);
            n1++;
            n = n1 + "";
        }
    }
}

